<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Cdb\V20170320\Models;
use TencentCloud\Common\AbstractModel;

/**
 * OpenDBInstanceEncryption request structure.
 *
 * @method string getInstanceId() Obtain TencentDB instance ID
 * @method void setInstanceId(string $InstanceId) Set TencentDB instance ID
 * @method string getKeyId() Obtain Custom key ID, which is the unique CMK ID. If this value is empty, the key KMS-CDB auto-generated by Tencent Cloud will be used.
 * @method void setKeyId(string $KeyId) Set Custom key ID, which is the unique CMK ID. If this value is empty, the key KMS-CDB auto-generated by Tencent Cloud will be used.
 * @method string getKeyRegion() Obtain Custom storage region, such as ap-guangzhou. When `KeyId` is not empty, this parameter is required.
 * @method void setKeyRegion(string $KeyRegion) Set Custom storage region, such as ap-guangzhou. When `KeyId` is not empty, this parameter is required.
 */
class OpenDBInstanceEncryptionRequest extends AbstractModel
{
    /**
     * @var string TencentDB instance ID
     */
    public $InstanceId;

    /**
     * @var string Custom key ID, which is the unique CMK ID. If this value is empty, the key KMS-CDB auto-generated by Tencent Cloud will be used.
     */
    public $KeyId;

    /**
     * @var string Custom storage region, such as ap-guangzhou. When `KeyId` is not empty, this parameter is required.
     */
    public $KeyRegion;

    /**
     * @param string $InstanceId TencentDB instance ID
     * @param string $KeyId Custom key ID, which is the unique CMK ID. If this value is empty, the key KMS-CDB auto-generated by Tencent Cloud will be used.
     * @param string $KeyRegion Custom storage region, such as ap-guangzhou. When `KeyId` is not empty, this parameter is required.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("InstanceId",$param) and $param["InstanceId"] !== null) {
            $this->InstanceId = $param["InstanceId"];
        }

        if (array_key_exists("KeyId",$param) and $param["KeyId"] !== null) {
            $this->KeyId = $param["KeyId"];
        }

        if (array_key_exists("KeyRegion",$param) and $param["KeyRegion"] !== null) {
            $this->KeyRegion = $param["KeyRegion"];
        }
    }
}
